According to George R. R. Martin, this religion's dualistic aspects of a good and an evil god are inspired by Zoroastrianism, along with the Cathars of Medieval Europe.
In this interview (at about 47:00 GRRM) talks about his inspirations for religion in his works.
From the Wikipedia article on Zoroastrianism we can draw parallels to R'hollor.
In Zoroastrianism, water (apo, aban) and fire (atar, azar) are agents of ritual purity, and the associated purification ceremonies are considered the basis of ritual life. In Zoroastrian cosmogony, water and fire are respectively the second and last primordial elements to have been created, and scripture considers fire to have its origin in the waters. Both water and fire are considered life-sustaining, and both water and fire are represented within the precinct of a fire temple. Zoroastrians usually pray in the presence of some form of fire (which can be considered evident in any source of light), and the culminating rite of the principle act of worship constitutes a "strengthening of the waters". Fire is considered a medium through which spiritual insight and wisdom is gained, and water is considered the source of that wisdom.