Sorry but this is not correct! Only the high frequency components of the PWM are filtered out by the inductance of the motor. The high frequency components are not needed since the motor is driven by the low frequency components which should be substantially unaffected. It is quite common to add a series inductance to increase the filtering.
The motor mechanically integrates (or averages) PWM pulses into a smooth rotation, but the inductance of the windings means that when the PWM driver turns on, it will take a certain period of time for the winding current to reach equilibrium and therefore generate the strongest magnetic field and therefore generate the most torque.
A high PWM frequency doesn't give the motor inductance enough time to reach full current and the magnetic field ends up being weaker (which means less torque).
Also, at low duty cycle PWM settings (where the ON time is very short) the problem is even worse.
See this link for a MUCH better explanation: http://www.precisionmicrodrives.com/application-notes-technical-guides/application-bulletins/ab-022-pwm-frequency-for-linear-motion-control
Another factor concerning PWM modulation (which has nothing to do with the inductance issue) is the fact that typically the transistors or mosfets in an H bridge turn OFF slower than they turn ON. Therefore, unless the transistor driver is "smart" and leave a small dead time between OFF and ON, there will be a short time of overlap where both transistors (the pair on each side of the H bridge) will be on at the same time, shorting the power supply to ground, creating high current spikes, electrical noise and wasting power as pure heat.
Since the "bad" time is independent of switching frequency, you can see that a higher PWM rate increases this mode of loss because more "short circuit events per second" occur at high PWM frequencies.