I wouldn't go in to a program like medicine "knowing" what I wanted to do for the rest of my life. My brother did that. He's in his second year of a radiology residency and absolutely hates it. Wishes he never went to med school and did something else instead.
Myself, I'm in my second year of dental school in Minnesota. I bought a new 328xi because I needed a new car and that's what I had my heart set on. At the end of the day it was roughly the same money as a nice Honda accord, ford fusion, Toyota Camry. Traded in my old car that was becoming too unreliable and I came out pretty good. With family help I'm not in any debt (paid for the car myself though).
I could've gotten a new M3, but it would've been a very stupid decision IMO. I want one really badly, but I've decided that I won't be buying an M car until my 30th birthday in 2019. When I graduate in 2015 I'm expecting to get a good paying associateship in a practice that I intend on buying out.
My advice, buy a new car only if you need it. Even then, pay cash so you don't have a car payment while you're in school. If it has to be a bimmer, consider something other than an M3. Something that everybody overlooks is happiness. If having a nice car will make you happy, then get it. There are days when getting into a nice car after spending 12 hours at school with my heated seats, heated steering wheel, etc. is really nice and makes the day not quite as bad.