The Rambam famously asks (Mamrin ch 2) how Chazal could enact new laws when the Torah in P' VaEschanan prohibits adding to or detracting from mitzvos. The Rambam answers that so long as Chazal make clear that their laws are only Rabbinic decrees and not mitzvos, i.e. they are no tin fact part of the Torah, there is no violation of bal tosif (see Ra'avad as well).
The Ralbag offers a different answer that takes ta'amei hamitzvos, the philosophical justification for mitzvos, into account. Bal tosif and bal tigra become a danger when they undermine the philosophical intent behind mitzvos. For example, there is a specific significance to taking four species on Sukkos. Were one to add or subtract one of the minim, the reason and symbolism of the mitzvah would be lost. However, there are additions that do not take away from the mitzvah's intent and purpose, but rather enhance and safeguard it. For example, the issur of amira l'aku"m on Shabbos. Rather than detract from the idea of not doing melacha, these laws protect and preserve the Torah law. Chazal's legislation is justified because it falls into this latter category.
What is especially noteworthy is the second example Ralbag gives of an issur derabbanan that safeguards Torah law: not cooking for a non-Jew on Yom Tov. Of all the derabbanan's the Ralbag could have chosen to offer as an example, he had to choose one that does not seem to be an issur derabbanan at all! Given the derasha of "lachem -- v'lo l'aku"m," at first glance it would seem that cooking for an aku"m would be an issur d'oraysa, not derabbanan. We once discussed this a bit in the comments to an earlier post - take a look.