Nanosecond laser writing of straight and curved waveguides in silicon with shaped beams