It's hard to say. A lot will depend on the personality of the individual fish. From what I understand, pearls are generally peaceful. However, I know that some dwarf gouramis can be very territorial when mature. If you decide to try it, watch them closely and make sure you have a backup plan (spare tank) in case you have to move one of them.
As an example, I had two dwarves in a 29 gallon for almost a year and they got along fine. Then all of a sudden, one of them became aggressive and they had to be sperated.
i dont suggest it, gouramis are very territorial and when I kept two in my 29, no matter how much i rearranged/added decor or plants- one hid constantly due to aggression by the other dominant one.
My boyfriend has two poweder blue male Dwarf Gourami's in a 55 gal and with all that space they still butt heads and chase each other. I've heard that keeping male/female pairs are the best way to ease the aggression for Gourami's.