Representing ideal classes of ray class groups by product of prime ideals of small size