You get a big trouble!, no gap
Definitely you cann't have gap between OPT and H1b,if you apply your h1b start from June/04,you will be fine after you send application. but this is be allowed due to H1b cap 2004(no quota anymore).
if you apply your H1b starting from 10/1004, you have 4 month gap between OPT and H1b, you will be out of status.
so you have to tansfer back to F1 or other type status.
good luck, find a lawyer to help you.