The billionaire gifted Tesla shares worth nearly $100 million to charities in connection with "year-end tax planning," according to an SEC filing.