Many-body localization of bosons in optical lattices