Unfortunately, it doesn't look like Thunderbird mail supports a general CalDAV login, so there's no way to create calendars FROM Thunderbird to a CalDAV server —*it only lets you link to calendars that are already there.
Since Fastmail doesn't support tasks, it won't allow you to create a CalDAV tasks calendar in the web UI. This means that you'd need to look for another app that could create this calendar for you via CalDAV on Fastmail's servers, and then somehow get the CalDAV URL so that you could enter it into Thunderbird.
Sadly, the process is about as convoluted as it sounds. There are Thunderbird extensions like
TbSync (with the
CalDAV add-on) that might help, but I haven't personally tried any of them as I don't use Thunderbird.