Yes, you can. If he stall is much bigger than a regular stall you can. If the horses are used to be in physical contact with each other and nothing happens it's quite safe to assume they will be okay.
Sometimes my horses get into each other's stalls and eat hay together.
If you decide to put them in, keep them under observation for a while to make sure they're okay.
This of course isn't true if the horses are shod in their hind feet. Then I would never put them together in a pasture or stall.
You may want to put a small divider in the middle if you could just to prevent the possibility of something happening. You could do something like just slide a 2x4 across the middle a chest height so there is slight separation.