Optimal discrete measures for Riesz potentials