Optimal Rates for Random Fourier Features