Is it allowed to pray beside a door?

Yes, but it is not recommended, except if this hurts other people and prevents them from getting in or out, where it becomes haram.