You can take the head off while the motor is in the bike without too much hassle, it'll be a nice tight squeeze to get it out, but i'd be more worried about getting it back on after installing studs.
I am trying to picture that but I do not believe you will be able to slide the head down over the studs while in the frame.
PS: I have a brand new unopened OEM head gasket I need to sell. Paid $89.
$55 + $5 shipped in the US.