I did a little research into loperamide today, specifically with regard to its pharmacokinetic properties, as an attempt to figure out what it is that's keeping it out of the brain. This problem is more complicated than just tweaking loperamide's functional groups to get it BBB-permeable. That is indeed one way to go about it, and loperamide's calculated polar surface area (PSA) is 43.8 square angstroms, which is definitely low for a CNS drug; I think 80-90 is a good range. I'm sure that tweaking polarity and bringing the PSA up would help loperamide get into the brain.
However, it turns out that loperamide is a P-glycoprotein (PGP) substrate, and undergoes active efflux transport away from the brain (ref in a second..). So even if you tweaked the molecule's polarity in favor of permeating the BBB, unless you lucked out and the change you made also wiped out its affinity for PGP, it will get grabbed and flung right back out by PGP. Blocking PGP transport of a drug intended for the CNS is tough and pretty much can't be done by clever interpretation of SAR tables. PGP has a broad range of substrates, and I'm not sure if all the ways in which it can bind substrates are yet fully understood. PGP can be thought of as a protective mechanism for the brain- its job is to keep foreign molecules from entering, and evolution has done a pretty good job with this one...
While reading I came across a paper that was specifically about the metabolism of loperamide, with emphasis on one type of metabolite in particular: N-alkyl-4-arylpyridinium type metabolites.
Drug Metabolism and Disposition, 32(9), pp. 943-952, (2004).
http://rapidshare.de/files/21824433/LoperamideMetabolism.pdf.html
One main topic of discussion in this paper is why loperamide isn't toxic. One of its metabolites is known to be a pyridinium-type species molecule, which is very similar to MPTP (N-methyl-4-phenyl-1,2,3,6-tetrahydropyridine), the neurotoxic metabolite of haldol that leads to the Parkinson's-like symptoms of tardive dyskinesia. That, and I once read something about clandestine chemists making shitty batches of demerol... but anyway, long story short, one hypothesis is that despite this metabolite being identified from loperamide, it's relatively safe and non-toxic specifically because it doesn't get into the brain, where the MPTP-like metabolite would do the real damage.
So with that in mind I'm not so sure loperamide is a good target for experimentation in this area. But please check the article out and see what you think..