I got a dog within the first few months of med school. At my school, the first two years we have classes 8-12 and some activities in the afternoon, but only on certain days. I also adjusted my study habits (I was never much of a library person anyways) and studied mainly in my apartment. Another big help was that my roommate loves dogs and was willing to help take care of her. The first few months were hard - training a puppy is work! But now, she's 2 years old and just a lazy lump and lays around all day whether I'm there or not.
CAVEAT: I'm MD/PhD, so now I'm in my research/grad school phase and my hours are flexible. There are a few people in my class (MD-only) that have dogs and they're now in their clinical rotations and I think they're having a tougher time. Either they have roommates who are not med students or are in different phases of training, they have significant others who can take care of the dog, or they hire dog walkers. I've heard sad stories of students (in previous years) who've had to give their dogs away because they couldn't care for them during rotations/residency. =(
So if you're really serious about getting a dog (do your research, it's harder than it seems), I'd recommend that you get one early in med school so that you're not trying to raise a puppy during clinical rotations/residency.
EDIT:
I STRONGLY recommend adopting a shelter dog. Purebreds are expensive and can have lots of problems (my dad's purebred dog has a connective tissue disease and hip dysplasia) and there are thousands of shelter dogs waiting to be adopted. I know your ideal dog is a German Shepherd, but you might be able to find a shepherd mix. Also, you'll probably (but maybe not) be living in an apartment wherever you go to medical school, and you really need to take the size of your possible future dog into consideration. German Shepherds can grow to be anywhere from 50-100 lbs, and need lots of space and exercise. My dog is only 30 lbs, and my apartment is big enough for her to run around if she needs to burn off any extra energy that isn't used by our daily walks.