Simona Halep will continue her return to tennis following a doping ban after being handed a wild card for the Madrid Open.