dule strictly, yes. but many people have applied for the green card during OPT, and somebody even renewed OPT fine (he might be lucky, but I don't guarantee it). well, EB1B needs your school to sponsor it, and they should agree with it first. otherwise you can try EB1A, without sponsorship requirement.
H1b is better that OPT. OPT costs you 350 dollars, and another 350 dollars for STEM. For H1b, you can extend it always once your NIW is approved. You never pay anything for H1b. I got EB1a during OPT, but I regretted applying OPT rather than H1b. If you can get H1b, just get H1b.