How do you get to the lavender town basement?

There is no Lavender Town basement. I assume you mean the top of the town. You will need to beat Team Rocket in Celadon to obtain the Silph Scope in order to even be able to defeat anything in the Lavender Pokemon Tower (your Pokemon will be too scared to move otherwise and the ghost cannot be indentified although 90% of the time it's a Gastly). Head up the tower and defeat the Ghost of Marowak, then you can get into the top of the tower.