Of course you can. When in play, a fossil counts as a Basic Pokémon, except that it doesn't have any attacks of its own, can't retreat, can't have Special Conditions, doesn't count as a KO when it is KOed, and can be discarded at any time. There is nothing that says that you can't attach energy. However, all conditions for attaching an energy must be met as usual (Boost can't be attached to a basic, must return an energy to attach Holon's Magneton/ Electrode, etc).