Features of the diffraction of Gaussian beams and Laguerre–Gaussian modes on subwavelength optical 3D microstructures with variable relief heights are calculated and studied in this paper. Silicon subwavelength ring gratings and diffraction axicons were considered as such optical microstructures. The height of individual relief elements varied. The propagation of laser light through the proposed optical elements was simulated using the finite difference time domain (FDTD) method. It was shown that it is possible to select the height of individual relief rings of ring gratings in such a way that it is possible to reduce the size of the focal spot down to 0.36 λ, form an extended light segment (up to 5.79 λ), and form optical traps.