The 50mm f1.8D would work fine EXCEPT it will NOT autofocus. If you like the idea of a 50mm prime then one of the G versions (f1.4 or f1.8) would be the right choice to get AF with your D5100.
Either of your other options are excellent too. It doesn't seem that the 40mm Micro is all that popular so it may be hard to find first hand feedback, but the few blog posts I have seen make it sound just fine - many just say 40mm Micro 'Why?'
If it were me I would go with the 35mm DX (I do have one) it's great and is the natural addition to your two zooms.
EDIT: Okay so you think FX is in your future.. then the 50mm f1.8G is probably the way to go. It'll be a little longer (75mm) on DX but that works fine especially for portraits.