Electronic and optical properties of K-doped ZnO: Ab initio study