No sheriff, jailer, police officer, marshal or other person in charge of any jail or lockup, under any pretense whatever, shall give, sell or deliver to any prisoner therein any spirituous, vinous or malt liquors or any other liquor or beverage prohibited by law to be sold, given away or otherwise disposed of, unless a reputable physician certifies in writing that the health of such prisoner or inmate requires it, and, in case of such certification, the prisoner may be allowed the use of the prescribed quantity of pure alcohol and no more. Any of said officers violating any provision of this section shall be guilty of a misdemeanor.