Explore your H-1B options as early as possible. Because most employers are subject to the cap, they need to file H-1B petitions on April 1st or shortly thereafter in order to obtain an H-1B for the following October. It is important to discuss this option with your employer well in advance of April 1st of the year your OPT will expire. Be involved with the process and make educated decisions. Remember that the ultimate responsibility for maintaining your status rests with you, not your employer.
It is illegal for an employer to file an H-1B on your behalf for a position that you have no intention of taking, and which the employer has no intention of offering you, just so that you can increase your chances of being counted under the cap. In fact, if you knowingly let an employer do this, it could be considered fraud under INA §212(a)(6)(C)(i), and may bar you from any future immigration benefits in the United States and even subject you to potential criminal prosecution! Be particularly wary of any employers who offer to file an H-1B for you for a fee.