I'd go with the modified position D, as well, although I might also go for a position on the lower left corner of the diagram, assuming I can stand far enough from the door to be out of it's path as it swings. That position is, assuming I can't be seen through the hinge area, the last position that an attacker could check. However, it also lets the attacker use the door as cover if he doesn't open it all the way, and lets a righty shoot around it easily while doing so. Then again, I have full confidence that any of my guns could shoot through any of my doors.
Personally, my apartment and bedroom are littered with stuff. If I have any warning at all, I'm moving to my bedroom door, which lets me look down the only open choke point in the apartment, the hallway. If I can control that hallway, peeking low around the door frame/corner able to expose my right hand/gun without exposing my whole body, I'll be in a pretty good position. Especially since there's light enough to see by leaking in through my front window.
If I have to fight in my bedroom (assuming my attacker isn't already on top of me), I grab my gun and roll across my bed, taking cover behind my bed, on the opposite corner from the door.
This thread did make me think, though: Maybe I ought to lay a spare mag or two in the corner behind the bed, or a second gun.