In recent decades, significant progress has been made in the field of laser beam shaping, driven by the growing demands in both scientific research and industrial applications. Notably, a class of beams known as nondiffracting beams, which exhibit such characteristics as self-healing and resistance to diffraction, has found practical utility in communication, imaging, and laser microprocessing. Although Bessel beams have become commonplace for various optical applications, further advances in beam engineering remain a need. One of the key requirements is the ability to control the elongation of the transverse profile of an optical needle, which is highly sought after for specific applications. In this study, we propose to achieve this control by utilizing nondiffracting Airy beams. The elongation of the optical needle’s transverse profile is achieved through the implementation of a binary phase mask. We evaluate the performance of this method through both numerical simulations and experimental assessments, employing various metrics, such as the major-to-minor axis ratio, the length of the optical needle, and its stability. We present a specific case where a flat optical element is created using geometrical phase induced by nanogratings inscribed within the element’s volume by means of a femtosecond laser. We validate the performance of this geometrical phase element through laser microprocessing of transparent glasses and report the results obtained from these experiments.