Not only is it possible in a limited space situation it wont hurt shit either,ive done it with no bad results,before you load the soil in the pot cut a peice of plastic large enough to divide the pot in half,put in small amounts of soil in each side to hold the plastic in place then fill the rest of the way up.
Dont get too freaked out about getting the plastic divider perfect,all your trying to do is keep the main root mass seperated,you'll never keep them 100% seperate but as long as your not growing 6ft monster plants it wont matter at all.
Ive grown 4ft high monsters with two plants to a pot using 3 gallon pots while divided down the middle,these were right along side single plant pots with zero difference between the different potting methods.
Go ahead,it wont hurt anything at all.