Building H-Bridge with MOSFETs - P-Channel question

From what I gather, the higher the resistance, the slower the rise and fall times of the FET will get.

But there has to be a certain amount of resistance to protect the transistor in the opto isolator.

So, in order to be able to PWM it, resistance has to be as low as possible to make the FET as fast as possible.

The 817 transistor's maximum collector current is 50 mA. This means R = U / I ->> 12V / 0.05 A = 240 Ohm. But I don't want to drive the transistor at maximum, so I could double or quadruple and try 500 or 1k Ohm.
Is that correct?