All-optical platform for THz pulse-shaping