Yes, you can have sex whilst on your period. However, it is easier to catch HIV and other STIs whilst having sexual intercourse on your period. As such you should always where a condom.
Although it is unlikely, it is still possible to get pregnant whilst having unprotected sex. So make sure you use contraception.
