Theoretically, yes. I'd be somewhat concerned, though, that the suspended yeast in your beer will start fermenting the sugars in the fruit. This, of course, will release CO2. If you simply cover your secondary with foil, pressure will build up, and bust through the foil. Be sure both the beer and the fruit are cold, and you should be fine.