Dynamical model for longitudinal wave functions in light-front holographic QCD