Multilevel silicon diffractive optics for terahertz waves