Commensurate and incommensurate vortex states in superconductors with periodic pinning arrays