Fifty new homes are planned for Swansea after the Welsh government announced a deal with a construction company.