Aliens in the hallway
The base game does not say anything about limitations for where you can place aliens and in fact has alerts that place them where the active player is. What this means is if the active player ends their turn in a hallway they would spawn there since there is nothing preventing them from doing so. Since that is the case there is no problem with a teleport to move them all to the hallway.

That being said however I would say that is a bad idea unless you plan on killing them all right away as the hallway* is about the worst place they could be when things go bad. For example if you move a bunch of them to a hallway and then the teleporter goes down you have potentially blocked off access to a room and made it take longer to move around the ship. Ideally you would want to dump them into a room that you have little reason to use such as the cargo hold or the war room (if the admiral is in the game they can draw battle plans from any room so access to that room isn't critical).

I would also note in both expansions you will find aliens in the hallways more frequently with no new rules about hallways which also says it is okay in the base game.

*The safest hallway is between the war room and cargo hold as it doesn't block entry into any rooms. The other 3 hallways end up in a room being blocked if the teleporter goes down.