Although it is not recommended, it is possible if your dogs get along well.  But it is better to be safe and get each dog his own private potty.