According to the Rambam (i.e. Issurei Biah 18:18, Kelaim 10:23, Shaar Avot Hatuma 16:1), a "safek deoraita" is not forbidden by the Torah, only by the rabbis. Yet if you are in doubt as to whether you violated a mitzvah, the Torah requires you to bring an "asham talui" guilt offering. How do these two laws not contradict one another?
I don't know the answer, but it sounds like something the achronim have probably discussed extensively.
UPDATE: an answer.