Well, technically no, you cannot. You need to transfer your gold (in the Clan Caste) in your storage first, then upgrade your town hall. Because you don't have enough capacity in your storage, you won't be able to have the required amount of gold.
What I strongly recommend is that you do not upgrade you Town Hall (lvl 9 I assume) until you maxed everything else. Your defenses, troops, walls, heroes should be maxed before you upgrade your Town Hall, for the simple reason that it will be way harder to farm. That includes maxing your gold storage.
General tip : Do not rush into maxing your Town Hall. You'd do better to max everything else before upgrading to the next level.