If an attack says to discard a specific type of Energy card to use that attack, can a Rainbow Energy be used to pay that cost?
Yes, you can.
Source: WotC Chat (2001-10-11)

Relevant cards

Note: All applicable cards may not be listed below.
HGSS1_104
PL1_121