Yes, the Bhagavad Gita says it in the following verse:
tyājyaṁ doṣa-vad ity eke karma prāhur manīṣiṇaḥ
yajña-dāna-tapaḥ-karma na tyājyam iti cāpare [BG - 18.3]
Some learned men declare that all kinds of fruitive activities should be given up as faulty, yet other sages maintain that acts of sacriﬁce, charity and penance should never be abandoned.
Tapa generally means austerity like meditation, self control and other spiritual practices. The 17th chapter of Gita states the different types of tapa. They are: Satvic, Rajasic and Tamasic.
1. Satvic Tapa (Austerity in the mode of goodness)
It is of three kinds, austerity of the body, of the speech and of the mind.
deva-dvija-guru-prājña-pūjanaṁ śaucam ārjavam
brahmacaryam ahiṁsā ca śārīraṁ tapa ucyate [BG - 17.14]
Worship of the Supreme Lord, the brāhmaṇas, the spiritual master, and superiors like the father and mother, and cleanliness, simplicity, celibacy and nonviolence are called austerity of the body.
anudvega-karaṁ vākyaṁ satyaṁ priya-hitaṁ ca yat
svādhyāyābhyasanaṁ caiva vāṅ-mayaṁ tapa ucyate [BG - 17.15]
Austerity of speech consists in speaking words that are truthful, pleasing, beneﬁcial, and not agitating to others, and also in regularly reciting Vedic literature.
manaḥ-prasādaḥ saumyatvaṁ maunam ātma-vinigrahaḥ
bhāva-saṁśuddhir ity etat tapo mānasam ucyate [BG - 17.16]
And satisfaction, simplicity, gravity, self-control and puriﬁcation of one’s existence are the austerities of the mind.
The threefold austerities in the mode of goodness are done with faith without any personal desires. [BG - 17.17] But the other two types of austerities are tainted with personal desires.
2. Rjasic Tapa (Austerity in the mode of passion)
satkāra-māna-pūjārthaṁ tapo dambhena caiva yat
kriyate tad iha proktaṁ rājasaṁ calam adhruvam [BG - 17.18]
Penance performed out of pride and for the sake of gaining respect, honor and worship is said to be in the mode of passion. It is neither stable nor permanent.
2. Tamasic Tapa (Austerity in the mode of ignorance)
mūḍha-grāheṇātmano yat pīḍayā kriyate tapaḥ
parasyotsādanārthaṁ vā tat tāmasam udāhṛtam [BG -17.19]
Penance performed out of foolishness, with self-torture or to destroy or injure others, is said to be in the mode of ignorance.