In every criminal prosecution a defendant is presumed innocent until the contrary is proved, and in case of a reasonable doubt as to his guilt he shall be acquitted. If there is doubt between the degrees of an offense or of lesser and greater offenses, he may be convicted only of the lowest of such degrees or of the lesser offense.