If you have a valid F-1 visa and OPT status you may travel, EXCEPT if you applied for Cap Gap to cover the period from when the OPT expires until when the H-1b visa starts (October 1st), then you cannot travel during the Cap Gap period.