Magnetic properties of commensurate Bose-Bose mixtures in one-dimensional optical lattices