A developer who could not find a social housing provider to take on affordable rent homes will sell them at 20% off the market price.