Rule of thumb to select MOSFET transistors based on conmutation frequncy
My rule of thumb is to add the rise time and fall time (as specified in the data sheet), multiply by ten and take the inverse to find the maximum frequency. So for the IRF540, there is a 44 ns rise and 43 ns fall time giving you 87 ns. Multiply this by 10 to give 870 ns then invert to get 1.15 MHz as the maximum operating frequency. 

But, this is a very general rule and there is nothing stopping you modifying this to be a factor of 20 or even 100 and I will break my own rule on some jobs where I need a little bit more efficiency.