In a 39 gallon? Yes, but get a trio (1 male, 2 females) - not a pair. Also, consider getting honey or thick-lipped gouramies instead of dwarfs. Dwarfs are very prone to disease and easily stressed. Breeding rams are certainly one common source of stress
The best diet is a varied one - plenty of live/frozen bloodworm, blackworm, brine shrimp and/or daphnia, as well as some fresh veggies like blanched zucchini and deshelled green peas. Also, obviously, a good flake - vary the brand as much as possible - alongside any pellets (including catfish pellets, algae waffers etc) and spirulina flake. Any fishfood, actually (except freeze-dried stuff ) is good as long as you feed a little of everything. I like to rotate the foods throughout the week and just change the diet to include more live/frozen foods when conditioning.