What are the basic units of heredity that are responsible for transmitting traits from parents to offspring?