Abstract tree-map function
Your direct definition of tree-map looks good.

The version using map may be written more succinctly (with the recursive portion factored out) as follows:

(define (tree-map f tree)
  (define (rec tree)
    (map (lambda (subtree)
           ((if (pair? subtree) rec f) subtree))
         tree))
  (rec tree))