Nonlinear localized modes in dipolar Bose-Einstein condensates in optical lattices