I'm looking for a way to become a subtype, specifically the swarm subtype.
How can I become a swarm?
Find a swarm that has a hive mind, and true mind switch into it.
From swarm traits:
A swarm is immune to any spell or effect that targets a specific number of creatures (including single-target spells such as disintegrate), with the exception of mind-affecting effects (charms, compulsions, phantasms, patterns, and morale effects) if the swarm has an Intelligence score and a hive mind.
... which makes it a valid target for mind switch.
Species that have Int and a hive mind include: Hellwasp Swarm (MM1), Shimmerling Swarm (MM3), Abyssal Ant Swarm (Fiend Folio), Cranium Rat Swarm (Fiend Folio), Viper Swarm (Fiend Folio), Silthilar (Lords of Madness), Death Scarab Swarm (Sandstorm), Feral Spirit (Sharn: City of Towers).
A sarrukh from Serpent Kingdoms can give you anything it wants to, provided you are a “scaled one,” though it’s easy enough to qualify as a scaled one with magic (e.g. alter self into a kobold). You can also cut the actual sarrukh out of the equation by turning into one yourself (they are scaled) and sharing that spell with your familiar (sarrukhs cannot target themselves with this ability, so your familiar has to use it on you rather than you doing it yourself). Note that for this to work, you need to be able to get supernatural abilities, e.g. by using shapechange or the Assume Supernatural Ability feat, because the manipulate form ability is supernatural. Also note that you should never do this because this is literally the Pun-pun trick.
Aside from that silliness, various polymorph effects, from polymorph to shapechange, can let you temporarily transform into swarms. Alter self if you get particularly creative. The warlock’s dark discorporation likewise lets you turn into a swarm, and that one is at-will/lasts as long as you want it to, but it also prevents you from doing anything while in that form.
The only way, to my knowledge, to be a swarm as much as you want without resorting to manipulate form is to be a were-murder-of-crows. The murder of crows is an Animal (swarm) from Tome of Magic, and it’s a valid choice of base animal for the lycanthrope template. When in animal form, you would have the swarm subtype of the murder of crows. Your humanoid and hybrid forms would not get the subtype, however.
Savage Species Route:
Interestingly enough, Savage species actually does indeed allow you to do it via the rituals listed Chapter 11 - Becoming a Monster. They even address this very case and purpose:
If you are a DM, chances are your players will want to build new characters when they see this book. Some, however, will want to transform their existing characters into monsters. This chapter provides information to use when that happens.
First the minor ritual in SS Pg. 147 states:
Some characters may wish to gain the benefits of a particular type or subtype of monster, without actually becoming a specific kind of monster. For instance, a character may wish to gain the goblinoid subtype in order to use goblinoid specific magic items. Another character may want a specific subtype in order to qualify for a prestige class. Minor rituals allow these sorts of transformations.
You can then follow the rules listed on the same page to gain the subtype or modify one of the example rituals provided to so the same.
If you are looking for more impact in the change, a major ritual will allow you to take on a monster class through LA or class levels at the cost of the experience points you already have, SS Pg. 149.
Doing that, or may I suggest even re-imagining, your character will require you to figure out the LA or class structure as a swarm monster; as such I have done so below as an example.
This is what the entire chapters two and three are all about. You have two choices, to do it as a level adjustment or as a class. Both chapters give recommendations on Monsters to use, though they have wording that suggest you can use their templates for other creatures. Though they do warn of the challenges of doing such and suggest working closely with your DM.
You said you wanted to be a Master of Flies with the swarm subtype, for my example let’s use Hellwasp Swarm (MM Pg. 238) as it has the best intelligence (6).
Please note: I made a few assumptions as I am not your DM and I do not know the power level of his campaign. The beauty of this game is you can make easy adjustments.
Chapter 2 - has the rules for the LA version.
This falls under the category of “Difficult Monsters”.
Starting Skill Points would be: Magical beast (2 + Int mod) × (HD + 3) SS. Pg.13
That is a total of LA of +12 and the subtype swarm, yay! Also, considering the creature has 12HD this lines up perfectly. All following the rules of Chapter Two!
Chapter 3 has the rules for the Class version. - A monster character gains the benefits and drawbacks of its type and subtype at first level. SS Pg. 26
This option is more open ended and thus requires more involvement and permission from your DM.
Mainly because it requires his approval for the progression to balance. It also has a more home-brewed feel. Though to gain the subtype you would only need one level; that is if you could convince your DM to let you multiclass before completing your racial class; this would be against RAW though - just so you know.
Here is a very rough version of using the rules as shows in Chapter 3 of SS, Pg 22 PHB, and Chapter 6/Pg. 173 DMG.
Hellspawn Swarm has no LA listed in the MM, so it is a 12th level class and would look something like this:
Level; Hit Dice; BAB; Fort; Ref; Will; Skill Points; Cr; Special
1st 1d8 +0 +2 +3 +1 (2+Int Mod)x4 1 Poison; Ability Focus (Poison); low-light vision; hive mind; swarm traits
2nd 2d8 +1 +3 +3 +2 2+Int Mod 1 DR 2/Magic
3rd 3d8 +1 +3 +3 +2 2+Int Mod 1 Alertness
4th 4d8 +2 +4 +4 +3 2+Int Mod 1 DR 4/Magic
5th 5d8 +2 +4 +4 +3 2+Int Mod 2 Dark Vision 60ft
6th 6d8 +3 +5 +6 +4 2+Int Mod 2 Distraction; Improved Init; DR 6/Magic
7th 7d8 +3 +5 +6 +4 2+Int Mod 2 Resist to fire 10
8th 8d8 +4 +6 +7 +5 2+Int Mod 2 DR 8/Magic
9th 9d8 +4 +6 +7 +5 2+Int Mod 3 Iron Will
10th 10d8 +5 +7 +8 +6 2+Int Mod 3 DR 10/Magic
11th 11d8 +5 +7 +8 +6 2+Int Mod 3 Immune to weapon dmg
12th 12d8 +6 +8 +9 +7 2+Int Mod 4 Inhabit; Toughness
Lastly, the rules in the books are meant to be applied to creative situations like this; otherwise they would not have given us the tables and guidelines used above to do so. We are encouraged to so come up with something new using the framework provided in conjunction with other players and DMs.
Book of Vile Darkness Look at the rules for Hivemind as shown in the Book of Vile Darkness Pg. 34 it fits well with this concept. Have fun!
I would say home-brewed mechanics can get you there, I am sure something is floating around somewhere. If not create your own.