If you hear imps behind the door, you can open the door and back off 3 tiles from the door, this way you're able to shoot the imp twice when he'll appear in the door, it will have to first get out of the doorframe (he can fire at you, but he cannot see you - or vice versa, while you can fire at it), then he'll have a chance to attack. You can do the same with zombies, just place the gift (heavily used armor, small medpack, or a substitute) 2 tiles away from the door. They will eventually see it and start approaching it, come through the door - surprise surprise! Medpaks work better since if a zombie is already wearing armor, they won't be attracted by another one.