Instead of compiling to assembly, lets take a more practical approach (that do exist).
There are programs such as f2c and p2c that compile fortran and pascal to c. The question is then "can these compilers write better code than you can?" In p2c (for example), it is necessary to write additional code in C to handle string processing.
This translates to assembly too. Any time there is something that the language is doing for you, under the covers, there is the likely hood that a programmer with understanding of the structures and algorithms necessary for that would write more compact (and faster) code in C.
(edit)
Lets consider a dynamic typed language that has strings and ints, a "+" operator that is thoroughly overloaded and a print command.
var foo = 3;
var bar = "a";
var qux = bar + foo;
print qux;
The C version of this program would be:
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv) {
int foo = 3;
char *bar = "a";
char qux[3];
sprintf(qux,"%s%d",bar,foo);
printf("%s",qux);
}
(Yes, I know that isn't optimal and is a contrived example) Which compiles to the following assembly on my machine (gcc -S -O9 foo.c)
.file "foo.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "a"
.LC1:
.string "%s%d"
.LC2:
.string "%s"
.text
.p2align 4,,15
.globl main
.type main, @function
main:
.LFB23:
.cfi_startproc
pushq %rbx
.cfi_def_cfa_offset 16
movl $3, %ecx
movl $.LC0, %edx
movl $.LC1, %esi
xorl %eax, %eax
subq $16, %rsp
.cfi_def_cfa_offset 32
movq %rsp, %rdi
.cfi_offset 3, -16
call sprintf
movq %rsp, %rsi
movl $.LC2, %edi
xorl %eax, %eax
call printf
addq $16, %rsp
.cfi_def_cfa_offset 16
popq %rbx
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE23:
.size main, .-main
.ident "GCC: (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]"
.section .comment.SUSE.OPTs,"MS",@progbits,1
.string "Ospwg"
.section .note.GNU-stack,"",@progbits
At this point, the question is what would it take to write a compiler that would be able to analyze the dynamic code and generate that assembly. While it might be possible with that extremely limited language, once you start adding more complexity to the language, a translation into something closer to the machine requires more and more code to handle the dynamic typing, or its own runtime (objective C takes this approach) - in either case, it will be slower than something written in C that doesn't need to have that overhead.
Or, the compiler has analyzed all the execution paths of the code (for the dynamic language) which I believe is equivalent to solving the halting problem.