constatu: the payment dates I referred to apply to Capital Gains Tax only. See Revenue's [broken link removed] for more info. For CGT purposes the year is split up into an initial period (up to 30-Nov) and a later period (to 31-Dec). The payment dates are 15-Dec for the initial period and 31-Jan for the later period (not 15-Jan as I mistakenly said earlier). Why? Because Revenue want to get their hands on their (a.k.a your) money as soon as humanly possible.
You can't file your tax return before the end of the year, so for CGT on shares sold in the initial period, no, you can't pay and file at the same time. You must make an up front payment separately. And if you file a Form 11 later it asks you how much of your gains occurred in each of the periods, so you can't fudge it.
Your gain on shares is net of any charges on the buy/sell transactions, e.g. commission, fx charges, stamp duty. But you can't offset any other ongoing costs such as account or maintenance fees etc.