Welding of titanium and other refractory metals with a free pulse shaping laser