To be safe..
3 letters from professors you've gotten a grade from, at least 2 of which represent the natural sciences (if you take an independent study in natural science for formal credit, that can count as one). 1 letter from a non-science professor is generally advisable to show "breadth," i would go for a class that emphasizes writing and communication ability. a fourth letter which mirrors the "theme" of your application seals the deal. no TAs, but grad students or postdoc teaching fellows are acceptable. additional letters from MDs or others with whom you've had a significant extracurricular activity are always good, but it's important to not drown the adcoms in verbiage. for example, i could probably get 10 strong letters, but i don't plan on sending in more than 6-7 (including a composite evaluation). after that, adcoms start to get annoyed (some schools have even set a limit on the number of letters that can be included in applicant's file, such as harvard at 6 and columbia at 7). use judgment and try to visualize what each recommender will say about you, and then minimize overlap. as stated in KnightInBlue's guide, save a letter or two to be sent directly to schools IN ADDITION to the composite stack because it enriches your file. ignore this point if your school doesn't use a pre-medical committee.
a good tactic is to find people who span roles in your undergraduate career. for example, one of my letters is from a science lecture professor, but he is also the director of the NSF summer program to which I was acccepted, the director of my major program, and my major advisor. another science prof i had for independent study in cell biology, but he is also my PI for the aforementioned summer program. my two other recommenders will be professors with whom I have participated in a significant activity outside of the classroom. don't just get someone who can comment on you in a narrow way and not say anything to distinguish you as an applicant. this is why I frown upon letters from physicians you've shadowed unless you REALLY know them, because what are they going to write? "he followed me around, seems like a great guy, demonstrated enthusiasm for medicine, etc." how many times do you think adcoms read that before they start gagging?
when to submit: as soon as you receive a secondary. any earlier and you run the risk of having the letters destroyed (some websites, such as UCSF's, state specifically that they will do this).
Hope this helps,
Z