A phototherapy device is disclosed including: a handpiece and a beamshaping element housed in the handpiece. The beamshaping element is adapted to receive a beam of light from an ultraviolet light source, modify the shape of the beam, and direct the modified beam to provide illumination of a region of a treatment surface, the region, having a tilable cross section at the treatment surface with an irregularly shaped boundary. In some embodiments, the irregularly shaped boundary is composed of three or more segments, each segment being sinusoid-like. In some embodiments, the beamshaping element includes a screen disposed between the light source and the treatment surface, the screen including a light transmissive with an irregularly shaped boundary, and where the irregularly shaped boundary of the illuminated area corresponds to the irregularly shaped boundary of the light transmissive region.