Differentiable optimization of the Debye-Wolf integral for light shaping and adaptive optics in two-photon microscopy