Two-component Bose-Einstein condensates in periodic potentials