  We characterize the anisotropic differential ac-Stark shift for the Dy $626$
nm intercombination transition, induced in a far-detuned $1070$ nm optical
dipole trap, and observe the existence of a "magic polarization" for which the
polarizabilities of the ground and excited states are equal. From our
measurements we extract both the scalar and tensorial components of the dynamic
dipole polarizability for the excited state, $\alpha_E^\text{s} = 188
(12)\,\alpha_\text{0}$ and $\alpha_E^\text{t} = 34 (12)\,\alpha_\text{0}$,
respectively, where $\alpha_\text{0}$ is the atomic unit for the electric
polarizability. We also provide a theoretical model allowing us to predict the
excited state polarizability and find qualitative agreement with our
observations. Furthermore, we utilize our findings to optimize the efficiency
of Doppler cooling of a trapped gas, by controlling the sign and magnitude of
the inhomogeneous broadening of the optical transition. The resulting initial
gain of the collisional rate allows us, after forced evaporation cooling, to
produce a quasi-pure Bose-Einstein condensate of $^{162}$Dy with $3\times 10^4$
atoms.
