officially you cannot!
H visa holder including H1 and H4, cannot take any degree course, at least on the CIS paper. Lots of school let you do that because they are not sure or don't even care since you are paying. But if you want a degree or so, you will run into trouble, you have to be a F1 to study for a degree program.
Though after you file I485, as an AOS, you can.