Not really. Although it is possible sometimes, most of the time one will pick on the other and the other will be really stressed.
It would be better to do a 10 gallon tank with 4-6 females to spread out the aggression. You would have to have a lot of hiding places.