Drone Interceptors are built on a tiny hull and are guaranteed to carry a beam weapon and a sublight drive. If they have space, they will add another two beam weapons and a shield generator in that order.
Guardian Fighters are built on a tiny hull and are guaranteed to carry a mass driver and an armor plate. If they have space, they will add another mass driver, a point defense component, and a shield generator in that order.
Assault Fighters are built on a small hull and are guaranteed to carry a beam weapon, a missile weapon, and a mass driver. If they have space, they will add an armor plate, a point defense component, a shield generator, a sublight drive, another beam weapon, another missile weapon, and another mass driver in that order. If they still have space after this, they will continue adding beam weapons, missile weapons, and mass drivers until no additional weapons can fit onto the hull.
The standard Assault Carrier module requires 70 capacity (support variety) and provides 2 assault fighters. The standard Drone and Guardian Carrier modules require 45 capacity (support variety) and provide 2 of the appropriate fighters. The advanced Assault Carrier module (or the Escort Carrier module) requires 70 capacity and provides 3 assault fighters (technically, it provides escort fighters, but the game currently does not distinguish between escort and assault fighters). I would therefore suggest that in general there is little point to using either Drone or Guardian Carrier modules except perhaps as filler components (though I'd probably sooner take engines/life support and perhaps some defenses); Assault Fighters are so much better than Drone Interceptors and Guardian Fighters that the lower capacity requirement probably isn't going to matter enough to make a difference, especially if you pick up the 30% support mass reduction instead of +1 moves per turn or the extra range for the first specialization after Interstellar Travel. Still, if you're really out after that fighter swarm ideal, go ahead. This is specifically for the unmodded game; if you've modded fighters to be more balanced with one another, or if you've modded carrier modules in any way, this may not be applicable.
As for how you should build carriers, that depends on how you want to use them. 'Optimal' is probably going to be found mostly by filling them up with Assault Fighters, at least at present; you're unlikely to get a better deal as far as firepower, defense, and HP density goes by filling the space with weapons, defenses, and HP boosters instead.