Recent studies on animals suggest that they can. See this fascinating story on Epigenetics. A recent study in Nature Neuroscience was able to train mice to avoid certain smells and this aversion was passed onto the grandchildren, even though the grandchildren had never experienced this smell and had not negative history with it.