I'm 15 minutes from my school (which is also right next to our major M3 clinical site).
If you're at a school where most of the material is recorded, a commute shouldn't be much of an issue the first two years (I know someone who has almost a 45 min drive...she comes to campus for mandatory sessions and exams, and that's basically it).
The problem will be in 3rd and 4th year when you have rotations that start at bizarre hours, like surgery. A long commute to get somewhere at 4am is something to keep in mind.