Terahertz quantum cascade lasers with sampled lateral gratings for single mode operation