ALBANY — The Staten Island district attorney, Daniel M. Donovan Jr., was named on Friday as a special prosecutor to investigate Assemblyman Vito J. Lopez of Brooklyn in the wake of a sexual harassment scandal.