You can use a solvent like benzene (white spirit) to get the glue off. But if there’s not a lot of glue left on the rim much then you can glue the new tire on top of the ‘old’ glue. This will soften up when it comes in contact with the new glue.
NEVER use a sharp or hard tool to scrape off the glue. You could damage the carbon rim and endanger the structural integrity.