Analysis of Terahertz-Induced Optical Phase Modulation in a Nonlinear Dielectric Slab