I'm sure the professor knows the requirements for such a letter and has had to work around it before. If your grades are in the straight A range, you volunteer/participate in class/and have gotten to know him/her via office hours, it's quite possible this prof will be willing to write the letter. I would specifically ask if he/she feels they could write a strong letter supporting your application to med schools based on what they now of you already. I'd do this during an appointment visit, CV and transcript in hand, and maybe a rough draft of your Personal Statement, so they will give the letter a better representation of "knowing you".