The answer is not directly. Although dividends and long-term capital gains are taxed at the same rates, capital losses can NOT be used to offset dividends.
However, if you have a net capital loss after offsetting all capital gains, up to $3,000 per year of capital loss may offset ordinary income which may include dividends.