On your products, does 0 weight mean Free Shipping?
There is a setting for this in the Configuration ... Shipping/Packaging ...
Order Free Shipping 0 Weight Status
If there is no weight to the order, does the order have Free Shipping?
0= no
1= yes
Note: When using Free Shipping, Enable the Free Shipping Module this will only show when shipping is free.
If 0 weight does not mean Free Shipping on your Products, then leave this setting set to 0 or NO ...
Now make all the Products in Category A and B 0 weight ...
Next, add normal shipping weights to Products in Category C and D ...
Now, you need to customize the USPS shipping module to add 2.00 to the $cost, to account for the $2.00 Flat amount, from the Quotes if there is 1 or more products in the cart from Category A and B ...
Would that work?
What do you want to happen if Products are only from Category A and B and not the other categories?
Do you want USPS shipping still where the price would be $2.00 plus the minimum charge for each shipping method ... or do you just want a Flat Rate $2.00 and the USPS shipping module disabled?