Vortex states in a two-dimensional superconductor at high magnetic field in a periodic pinning potential