I think schools prefer lecture courses but won't mind if you take it online; I know multiple students who got into medical school and took biochemistry online, and I seriously doubt microbiology is any different.
Quick note: microbiology is one of my favorite subjects, but the actual class I took on it was wholly worthless. I wish I could have taken a real microbiology class 🙁. I know you don't care, but I hope that answers your question.