Nikon D5100 with AF NIKKOR 50mm f/1.8D for Portrait Photography?

I want to buy a lens for portrait photography and was thinking to get a 50mm prime. Is it a good idea to get a D lens? What possible problems can occur? I know this lens won't auto focus on my camera.

You need a far better lens than that.
and relying on manual focusing is risky
what you want is something with de-focus control

It will work just fine except for the lack of autofocus.
I would strongly recommend that you save some more money for the AF-S G version which will autofocus. Manual focus in shallow depth of field situations with a not perfectly static subject (people can't stand still) and a handheld camera is a major pain.
Edit:
Laurence, those lenses wouldn't autofocus on that camera either. Defocus control lenses are real special purpose lenses used by only very few people and not a necessity for portraiture at all. Any prime lens of a suitable focal length will work fine for 99% of all amateur portrait photographers.
Also, the lenses that you listed are too long for common portrait use on a crop frame camera. They would even be a tad long on full frame, especially the 135mm one.

The only problem will be with how hard you find manual focusing to be.

The best lens is still an 85mm portrait lens. Even though you have to back up a bit with a cropped DSLR, the lens still outperforms the 50mm.
And in most portrait situations; whether it be in a wedding, a studio setting, or outdoors, you should have no problems backing up a bit.
Compensating for a cropped camera by reducing focal length so you don't have to backup is a bad idea, as you introduce perspective distortion. It is far better to backup than to reduce focal length (i.e. 50mm crop vs 85mm full frame)
Many professionals have gone to a 70-200mm telephoto for portraiture due to it's superior bokeh, and if they can manage to use that lens, there should not be any issue with backing up.

Very good lens, I'm using it as well.
- Nikkor 50mm f/1.8 or Nikkor 85mm f/1.8 for outdoor portrait photography?
- NIKKOR 50mm f1.8g or 35mm f1.8g for portrait photography?
- Nikkor 50mm AF-S 50mm f/1.4G or AF 50mm f/1.8G?
- Nikkor AF-S 50mm f 1.4g vs Nikkor AF-S 50mm f 1.4d?
- What is the difference between AF Nikkor 50mm f/1.4D & AF-S NIKKOR 50mm f/1.4G?