One way:
First running a mitsunobu reaction, to invert the configuration of the alcohol, and then once you have the S-heptanol, convert the alcohol in a good leaving group and run a Sn2 reaction.
Maybe is possible to do the direct mitsunobu reaction using as a Nucleophile HS-R (is more acidic than the alcohol and shoulb be work...) but I'm not sure.