A Biologically Plausible Algorithm for Reinforcement-shaped Representational Learning