Yes it's possible. You will have to edit the random maps, and more importantly, edit the GalaxyScenarioDef file in order to make the various homeworld start-conditions per faction.
Though I don't understand what you mean by two homeworlds... Do you mean two starting planets, or two TerranHome planets? As there is a difference between the two; however you can indeed make the second planet colonized AND have starting structures/ships, even in a randomly-generated map, I've done this myself. If you want to make them start with upgrades... You will have to make a new planet entity file for that.