Factorization in some ideals of Lau algebras with applications to semigroup algebras