Graph-state preparation and quantum computation with global addressing of optical lattices