Spin torque oscillators (STOs) are compact, tunable sources of microwave radiation that serve as a test bed for studies of nonlinear magnetization dynamics at the nanometer length scale. The spin torque in an STO can be created by spin-orbit interaction, but low spectral purity of the microwave signals generated by spin orbit torque oscillators hinders practical applications of these magnetic nanodevices. Here we demonstrate a method for decreasing the phase noise of spin orbit torque oscillators based on Pt/Ni80Fe20 nanowires. We experimentally demonstrate that tapering of the nanowire, which serves as the STO active region, significantly decreases the spectral linewidth of the generated signal. We explain the observed linewidth narrowing in the framework of the Ginzburg-Landau auto-oscillator model. The model reveals that spatial non-uniformity of the spin current density in the tapered nanowire geometry hinders the excitation of higher order spin-wave modes, thus stabilizing the single-mode generation regime. This non-uniformity also generates a restoring force acting on the excited self-oscillatory mode, which reduces thermal fluctuations of the mode spatial position along the wire. Both these effects improve the STO spectral purity.