Near-infrared/optical counterparts of hotspots in radio galaxies