Every officer who is guilty of wilful inhumanity or oppression toward any prisoner under his care or in his custody is punishable by fine not exceeding $5,000, and removal from office.