Yes, you can compost mangoes – though the different bits of the fruit will take different amounts of time to break down.
Mango flesh will very quickly rot down but the tough skin will take longer. If you want the skin to rot down quicker, or at least be less of a problem in your compost, slice it into strips before adding it to your heap.
Mango stones will take frickin’ ages to breakdown though – if you have a basic heap and don’t want the stones to be hard lumps in your future compost, leave them out. You can read about other things to do with fruit stones on How Can I Recycle This?
In the future, don’t forget that over-ripe mangoes make great facial masks or can be pureed to make a sauce for yoghurt, ice cream or cereal.