How does dimethyltryptamine cross the blood-brain barrier?
Although serotonin and dimethyltryptamine (DMT) have similar chemical structures (see Jori's answer), serotonin is not transported across the blood brain barrier (BBB) ("serotonin does not cross the blood–brain barrier").  On the other hand, not only does DMT cross the BBB, it is one of the few compounds that is actively transported across the BBB.  While most compounds that cross the BBB do so by being lipid soluble (relatively small non-polar compounds) some molecules are assisted across the barrier through a variety of mechanisms.  Some of the known assistive paths include


glucose carrier: transports glucose and several other sugars across the BBB
phenylalanine carrier: transports a number of neutral amino acids across the BBB
arginine carrier: transports several cationic amino acids across the BBB
lactate carrier: transports several monocarboxylic acids across the BBB
adenosine transporter: transports purine nucleosides as well as uridine
organic cation transporter: transports a variety of cationic compounds, including monoamine neurotransmitters


There are more classes and sub-classes within each.  The following two references provide nice, readable overviews


Small Molecular Drug Transfer across the Blood-Brain Barrier via Carrier-Mediated Transport Systems
Drug transport across the blood–brain barrier


I don't know which of the above transporters is active in the case of DMT, but I strongly suspect it is the "organic cation transporter".  Here are some further references that relate specifically to DMT active transport across the BBB


Takahashi T, Takahashi K, Ido T, Yanai K, Iwata R, Ishiwata K,
Nozoe S (1985) 11C-labeling of indolealkylamine alkaloids and
the comparative study of their tissue distributions. Int J Appl
Radiat Isot 36:965–969
Yanai K, Ido T, Ishiwata K, Hatazawa J, Takahashi T, Iwata R,
Matsuzawa T (1986) In vivo kinetics and displacement study of
a carbon-11-labeled hallucinogen, N, N-[11C]dimethyltryptamine.
Eur J Nucl Med 12:141–146


They were found in this article, "Bufotenine: Toward an Understanding
of Possible Psychoactive Mechanisms"

P.S.  We've all read fairy tales where kissing a frog turns the frog into a prince.  When the skin of the Bufo toad (Colorado river toad, sonoran desert toad and other members) is licked, a psychedelic experience results.  It is not illegal in the US to own the toad, although the Bufotenine is a controlled substance!  Anyhow, just wondering if this, or something similar, is what the fairy tales are based on.