Yes, you can compost avocados – though the different bits of the fruit will take different amounts of time to break down.
Avocado 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.
Avocado stones will take frickin’ ages to turn into compost 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?