Deuteron optical potentials and the 16O (d,p) 17O reaction