Is it okay to have diarrhea during your period?

Yes. The hormonal changes associated with the menstrual cycle have been associted with changes in bowel habits and are a common cause of irritable bowel type symptoms. These can often be controlled with medications and occasionaly with dietary modification and the use of probiotics.
Prostaglandins. In addition chemicals called prostaglandins are released with your period. Meds like Ibuprofen are used to block them. These prostaglandins may also cause diarrhea.