Can I travel to India for 2 months and come back in March while my opt ends in June?

I’ll be leaving for India in January 2018 and come back in first week of March 2018. It’s an2 months stay in India for my wedding.

My OPT ends in June 20, 2018

Is it safe to travel ?

Safety is very relative. There are many people who have go to India and come back successfully in their OPT. Also, there are many cases, where they have been stuck with issues. So, it is relative.

In general, having all documentation helps, but we do not know what the CBP officer thinks. If you can avoid, just avoid travel. If you have to go for sure, then take a chance and go.