The dual of semigroup algebras with certain locally convex topologies