Laser welding of plastics using a mask