Wavelet-like basis functions for efficient waveguide mode computation