Diode
YOu need a flyback diode with a particularily fast recovery time.
You can know the switching time limit of the MOSFET by looking that the datasheets of the power mosfet you are using. Look at the rise and fall times then you can decide how "ideal" you want the square wave to be. Determine you own minimum switching time- the longer the longer the PWM pulse stays on or off, the less effect the rise and fall times will have on making the PWM waveform deviate away from a square wave.
If you want to determine the switching limit as a whole, just use 20kHz if you arent sure. Too slow makes the motor throb, and too fast makes a lot of energy wasted because the MOSFET has to move between the lossy intermediate stage between full conduction and no conduction every time it switches. The more often this happens, the more time is spent in this lossy state and the more power is dissipated.