Yes, you can have two male guppies together. Male guppies have no problem cohabiting. With that said, male guppies can sometimes exhibit aggression towards other males. For example, they may chase each other to assert dominance or fight over a female. This is normal and shouldn’t be a concern.
However, you need to keep an eye on your male guppies as intense fighting could result in injuries. These injuries usually aren’t life-threatening, but they may lead to infections and disease.
Provide hiding spaces in the tank so weaker guppies can hide from dominant males. Also, if they get too vicious, try separating your guppies.