Can I use pwm to control speed of at motor driver?
You can, but I'd use ENA as the pwm input. That is because if you want to reverse the motor you will need to hook a pwm output to IN2 instead of IN1, and that means another used pwm output for your microcontroller. You can do as you say though.
Keep in mind that the pwm frequency has a maximum, the L298 datasheet is not that clear but it seems to me that you can go up to 40kHz, while the typical frequency is 25kHz (page 4).

Start with a slow (some 10kHz or a bit more) pwm and go up until you are satisfied.