You should be ok, but check!
As long as your I-20 has not expired, I think you're fine.
You should apply for OPT 3 months before you expect to graduate.
I would advise you to check with the international student services at your school to be absolutely certain about your F-1 expiration query.
jimsac