Yes you can do an MD fellowship from a DO IM residency. I've met plenty of attendings who have done just that, and to back up what the last poster said - everytime one of these attendings asks if I am doing a DO or MD residency, and I tell them MD, they all agree with my decision, and even tell me that in front of other students pursuing DO IM residencies, embarassingly enough. I believe this in more due to the opportunities available through the allopathic vs the osteopathic hospital that they said that, not so much that it was a poor program.
It was the best decision I ever made and one I know I will not look back upon. But i should add I am interested in doing a fellowship. If I was doing general medicine I think most DO IM residencies would be just fine. But again to answer your question, yes you can get into an MD fellowship from a DO place. I e-mailed several PDs in the fellowship I am pursuing last year, and as you know they all can be competitive. A few told me they basically have so many qualified MD trained applicants (i.e. MD and DO) that they sometimes don't feel the need to see someone from a DO residency. These were programs with DOs there, so it wasn't an anti-DO thing.