What's wrong with:
(D) Behind the door
A few things:
1. You can be seen through the gap between door and jamb when it's opened.
2. You can be detected and even attacked by swinging the door open violently.
3. You're still in a corner and you've cut your reaction distance.
That said, behind the door is still a better place than B or C simply because you may not be immediately in the BG's field of view immediately upon them entering the room. One key thing that hasn't been discussed: we all seem to be basing our positioning with the assumption that the person entering the room "knows what they're doing", i.e., we think they'll react like we may have been trained to react. There's no rule that says that they can't stay outside the door after it's been opened and simply blast away into the room.
In that circumstance, any position that places you out of any angle of fire from outside the room is better than A, B or C. Hence, my argument for a position farther away from the back of the room, not in the middle of it, but far enough away to give you some time and space to maneuver should they come in through the door.
Look at the attached image:
From position E you have a clear field of fire on C.
From position F you have clear fields of fire on B and C.
From position G you have clear fields of fire on A.
Best placement in the room? Any of the angles not covered by E, F, and G that give you reaction time and don't limit your movement. The D I've placed gives you good odds of not being seen immediately, room to move, and you're out of the fields of fire from outside the room. Granted, if the door were completely open you might be in G's field of fire, but at least you have a better chance than A, B or C. You can adjust your distance a little closer to the front wall, just don't get all the way up in the corner. If the room is dark, you have a better chance from D also. Dark corners would draw my fire if I were simply trying to supress anyone I thought was there and didn't care who I hit.
This is also a really good place to use your combat crouch or kneeling position. You make yourself a smaller target, avoid silhouetting yourself, and put the BG('s) up where they may be silhouetted by any ambient light. Prone is not a good idea since, again, it limits your mobility too much.