On-chip optical lattice for cold atom experiments