Having taken online sciences classes, I wouldn't recommend taking courses that are foundational for the MCAT in that format. Check which schools accept community college credits. Without looking, I believe it's a very small minority that refuse to accept community college classes.
I did take my chemistry, physics, and biology sequences at a community college, taught by instructors with PhDs in their fields(for the most part). From what I've heard from my friends who took these classes at the large, four-year university nearby, I received a far better education at the "inferior" community college. At the school I earned my bachelor's and master's from, the science professors were far more concerned with research, resulting in their classes being little more than rapidly mumbling off slides. The community college was a complete 180 and a much better experience because the instructors loved teaching and research was barely a blip on their radar.
If you're pursuing a STEM degree, you'll have 2 years of upper-level science classes at a four-year university to prove you can handle rigorous classes. I think the main concern is for career switchers who have a non-science degree and then complete just the dozen or so premed perquisites solely at a community college. In that situation, adcoms don't know how rigorous the community college was and don't have any other science classes to assess your preparedness by. As long as you're following it up with two more years of classes in a science major with a high GPA, you should be fine from an admissions perspective.
YMMV.