Backbone reconstruction in temporal networks from epidemic data