How to use motor drivers with H-bridge and PWM input, to control direction and speed of DC motors?
You can use PWM control under the following two conditions:

The average voltage applied does not exceed the rated voltage of the motor. This ensures that the average power rating of the motor is not exceeded.
The duration of the PWM pulse does not cause the winding current to saturate. The rotor windings act like an inductor, which smooths the current, but if the PWM frequency is too low, you won't get a smooth current but rather high current pulses during each PWM pulse.

To do a quick and dirty test, just set the PWM frequency to 20kHz, and set the duty cycle so that the effective voltage applied to the motor, d*Vin, = Vrated.