All-Optical Thz Pulse Shaping In A Dynamic Waveguide