"A Message from Charity", by William M. Lee.
Peter Wood is a teenager sick with a fever that puts him in telepathic contact with Charity Payne, a Puritan girl from Colonial America (specifically 1700), who also has the same type of fever. The two share realistic thought-visions of each other's worlds, and Charity has a glimpse of the world in the year 1985. The teenagers discover they can communicate and form a true friendship.
When Charity is discovered (when she tries to humble a know-it-all neighbor girl), she is branded a witch for her knowledge of future events. Now her friend from the future must help her escape the clutches of her villagers and prove she is not a witch before she is tried and executed.
Peter discovers a historical record that two dead bodies would be discovered near Charity's township, and that her judge would eventually be convicted of murdering them. Charity uses this information to convince the judge that she could expose him, so he drops all charges and releases her. Afterward, Charity tells Peter that they probably should not go on communicating, lest more problems arise. Peter sadly agrees, and they bid each other goodbye.
Approximately one year later, Peter receives one last telepathic call from Charity. She has left him a message at Bear Rock, a local landmark. Peter finds Charity's message: chiseled into Bear Rock is a Valentine-like heart with the initials "PW + CP".
The link and description are from the Twilight Zone episode summary, but they follow the same plotline. You can find a list of publications on ISFDB here. I personally read it in the Asimov collection, Young Witches & Warlocks.