dd does not do any compression, so if the source partition is 50GB, then the output image will be 50GB, even if only 10GB of that is useful data within the filesystem. 40GB of zeroes is still 40GB.
Most likely what you'll need to do is take a 50GB image, save it somewhere you have space, and then use a partition resizing utility like gparted to shrink the partition down to 10GB (provided there is sufficient free space).
It is possible to pipe dd commands through a file compressor like gzip, although this will take longer, since more CPU time is required for the compression. Also, I would not recommend this unless you are absolutely sure what you are doing, and have your data backed up by some other means.
Take a look at PartImage, PartClone and Clonezilla. One of these will probably be more suitable than blind dd.