I would have to say that it depends on the school that you plan on going to and what your grades were. If you had low grades at the community college and re-took the courses at your 4-year school, I don't think it would be a problem.
On the other hand if you had good grades, then you would really need to call the medical schools you were interested in and ask them. There is alot of difference amongst MD vs. DO and from school to school. Some schools think that science courses at community colleges are less challenging and less informational than the exact same course at a 4-year school. Others agree with me and say that the community college courses are just as challenging and actually offer a better learning environment due to greater teacher-student interaction from the smaller class/lab sizes. An example is A&P courses at my local community college are about 35-40 in the lecture and 10-12 in the lab, while the same A&P course at my four year school is averaging 100-120 people in lecture and 20-25 in lab.
I called several of the medical schools I was interested in and got very different responses. My top choice of med school is Lake Ere College of Osteopathic Medicine, the admissions rep that I talked to said that they are perfectly ok with students getting their degree online (I am an online student), but they prefer the science courses to be in a physical classroom. I then asked her what the school though about CC science courses and she said that they were perfectly acceptable (once again preferably in a physical classroom) as they realize that there is better interaction between teacher and student in CC courses because of the smaller class sizes and that the school did not differentiate between CC and 4-year school science courses. However, I talked to the University of North Carolina at Chapel Hill and Wake Forest University and they said that they would consider CC science courses but they would prefer they be from a 4-year school because courses at the 4-year school are more challenging. Eastern Carolina University said that community college courses were acceptable but most of their applicants have taken their science courses at 4-year schools.
No school will absolutely turn you down based solely on CC vs. 4-yr school science courses but the admissions panel may weigh more heavily toward courses from a 4-year school. So once again the key is talk to the schools you are interested in.
If you are a solid applicant with a good overall GPA and a good Science GPA (even if taken at a CC) and you get good MCAT scores, have good recommendations, and good volunteer/work experience then I personally don't think you would have too much of a problem.