If you say 'There is a lot of books' it sounds like you mean literally a lot (a piece of land). It does not make much sense.
We say 'There are a lot of books', where the focus is on the books, not on a specific item called 'lot'. 'A lot of' or 'lots of' simply means many. Some may argue that this is not grammatically correct, but I disagree, as we are talking about the books and giving some information about them - we are not talking about a physical 'lot'.
Yes, as Teah said above, 'a lot' can be also used in the sense of 'a group of'. In that sense you would use 'there is'. Good point, Teah.