The six chakra scheme itself, with its lotus petals, presiding deities and seed syllables, is fixed in one text, the Shat chakra nirupana of Purnananda Yati, composed in Bengal in 1577 as part of a larger Tantric compendium, and it is this text, not scripture reaching back to the Vedic period, that assigns lam to muladhara, the root center, and earth as its element. Older Tantric sources discuss subtle body centers in varying numbers and arrangements, so Purnananda's version is best understood as the systematization that became standard rather than as the origin of the idea of chakras generally.
Transmission to the English speaking world runs through one specific and contested translation, Arthur Avalon's 1919 rendering, published under the pen name of the British judge and scholar John Woodroffe, titled The Serpent Power. That translation is the source for most of the vocabulary Western yoga now uses for chakras, kundalini and the bijas, and it is also the translation most criticised by later Indologists for reading nineteenth century occult and Theosophical categories into a text that does not use them in the same way, softening some of the more transgressive Tantric material and introducing a vocabulary of vibration and energy that reflects Woodroffe's own intellectual milieu as much as Purnananda's Sanskrit. Later scholarly translations exist and diverge from Avalon's at exactly these points, but it is Avalon's version, not the more recent and more literal ones, that fixed the popular understanding of what a bija like lam is supposed to mean and do.