Gaijin is just "foreigner" (though it is a slur, as it's an abbreviated form of Gaikokujin). What you're looking for is "Hakujin", meaning "white person". I'm not sure if it's really a slur, though it does feel a bit odd to me if people use it to refer to me.