There should be no reason why you can't replace the cam with the motor in place. However, you cannot do a proper job of replacing the cam bearings, if that is what you want to do.
I have pulled the cam on these motors before, mostly to change the timing gear.