Yes, and it is known as sperm sorting. It is a widely used gender-selection technique that is done prior to the insemination of the egg. Sperm sorting allows the specialist to separate X-chromosome (female) sperm from Y-chromosome (male) sperm. While sperm sorting is done prior to conception, PGD with sex selection is performed after conception, once the embryos have been created, and prior to being transferred to the uterus.
Learn more about the different gender selection options available nowadays here: Guide to Gender Selection Methods.