Short answer: No.
Augustine brings this question up in his City of God. But let’s precise the question, for as stated it is sloppy.
Can I do acts which at least look charitable, and thus be excused my neglect of the divine or natural or ecclesial law?
This is the question Augustine is after in his great tome. The answer is a resolute “No!” Why?
Well, when you love someone, you seek to do their will, if that will is upright. God’s will is always upright. And his will is expressed in these various laws: Divine positive law, natural law, and ecclesiastical law.
At least divine and natural law are always “prudent”. It might be that some ecclesiastical law is less prudent than desirable. That is possible. It does not thereby become null. Take any change in ecclesiastical law that takes place. You could argue that the situation of 200 years ago justified law X and the situation now justifies law Y. However, laws Y and X are quite distinct. Yet, the situation gradually shifts. So, on the supposition the change is called for, we could say that the situation (past or present, we leave up for grabs) and the law surely, at some point, was not ideal (less than prudent). But at any rate, it remains law.
Back to the point: God expresses his will through all these laws. Now, then, for me to neglect one of these major laws is to neglect God almighty. How then can I really love whom I neglect? Whose express will I offend? Indeed, I cannot.
But then what about all those soup kitchens I helped out? What about raking the leaves for my neighbor? Yes, and what about feeling really pained at the sight of a little boy being excessively yelled at and scolded by his obviously negligent parents? These are all decent human acts and responses. However, I cannot be doing them out of true charity if indeed I am breaking God’s law by contraceptive intercourse, by eating meat on Fridays in Lent, by masturbating, by failing to do my family duties while working extremely long hours without necessity (because it is more peaceful there), by getting wildly drunk and driving home, by shooting into the woods without certainty that noone is there, etc.
Thus, we give the lie to the myth in Dostoevsky’s great novel, Brothers K. The myth that he propounds is that if I only did one unselfish deed in my whole life, then I shall be saved (provided I allow others to be saved by it also). This is pure nonsense. Nicely romantic. But nonsense.
There is one condition of salvation for the freely acting: Having died in the state in which I love God intimately and above all things (i.e., in charity). And that presupposes hope in God, not in my deeds. And that presupposes faith in him. And all of these imply the desire to be a member of the one and only Church instituted by Jesus Christ–the Holy, Catholic, Apostolic, and Roman Church. This desire can exist in several forms: Real delight in being a member, explicit desire of those seeking membership, or finally, an implicit desire of those who seek to carry out God’s laws whenever they are made manifest to them. Hence, the demand that we go out and evangelize, so as to awaken those who sleep but long for all the saving graces Christ bestowed on his Church.